home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
smaltalk
/
manchest.lha
/
MANCHESTER
/
manchester
/
2.2
/
zoom.st
< prev
Wrap
Text File
|
1993-07-24
|
3KB
|
91 lines
" NAME zoom
AUTHOR ikp@cs.man.ac.uk
FUNCTION menu funcs for expanding window to screen size
ST-VERSIONS 2.2
PREREQUISITES
CONFLICTS
DISTRIBUTION world
VERSION 1.1
DATE 22 Jan 1989
SUMMARY zoom
adds two options to the default StandardSystemController blue
button menu. `Zoom' expands the window to fill the screen (leaving
space on the left for the scrollbar(s)), and `unzoom' returns the
window to its original size.(2.2). IKP
"!
View subclass: #StandardSystemView
instanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize iconView iconText lastFrame cacheRefresh oldViewport'
classVariableNames: 'FillInHoles '
poolDictionaries: ''
category: 'Interface-Support'!
!StandardSystemController methodsFor: 'menu messages'!
unzoom
"collapse to size before zoom"
view oldViewport == nil "this view has not been zoomed"
ifFalse: [
view erase.
view window: view window viewport: view oldViewport.
view oldViewport: nil.
view displayEmphasized]!
zoom
"expand to full screen"
view oldViewport == nil "this view has not been zoomed"
ifTrue: [
view erase.
view oldViewport: view viewport.
view window: view window viewport: (Rectangle origin: Display boundingBox origin + (31@0) corner: Display boundingBox corner).
view displayEmphasized]! !
!StandardSystemView methodsFor: 'initialize-release'!
initialize
super initialize.
self insideColor: Form white.
labelFrame _ Quadrangle new.
labelFrame region: (Rectangle origin: 0 @ 0 extent: 50 @ 20).
labelFrame insideColor: Form white.
labelFrame
borderWidthLeft: 2
right: 2
top: 2
bottom: 0.
self label: nil.
isLabelComplemented _ false.
minimumSize _ 50 @ 50.
maximumSize _ Display extent.
oldViewport _ nil.
cacheRefresh _ true! !
!StandardSystemView methodsFor: 'viewport access'!
oldViewport
^oldViewport!
oldViewport: viewPort
^oldViewport _ viewPort! !
!StandardSystemController class methodsFor: 'class initialization'!
initialize
"Initialize the class variables."
"StandardSystemController initialize.
StandardSystemController allInstances do: [:sc | sc initializeBlueButtonMenu]"
ScheduledBlueButtonMenu _ PopUpMenu labels: 'new label\under\move\frame\collapse\zoom\unzoom\close' withCRs lines: #(1 5 7 ).
ScheduledBlueButtonMessages _ #(newLabel under move frame collapse zoom unzoom close ).
MenuWhenCollapsed _ ActionMenu
labels: 'new label\under\move\expand\close' withCRs
lines: #(1 4 )
selectors: #(newLabel under move expand close )! !
StandardSystemController initialize.
StandardSystemController allInstances do: [:sc | sc initializeBlueButtonMenu]!